import Vue from 'vue'
import Router from 'vue-router'
import NoPage from '@/views/404'
import Hello from '@/views/Hello/World.vue'


Vue.use(Router)

const createRouter = () => new Router({
    mode: 'history',
    base: process.env.BASE_URL,
    routes: [
        {
            path: '/404', component: NoPage, name: 'NoPage',
            meta: {
                title: 'NoPage',
                requireAuth: false,
                NoTabPage: true,
                NoNeedHome: true // 添加该字段，表示不需要home模板
            },
            hidden: true
        },
        {
            path: "/",
            name: "Hello",
            component: Hello,  
            meta: {
              title: "首页",
              requiresAuth: false
            }
          },

        {
            path: '*',
            hidden: true,
            redirect: { path: '/404' }
        }
    ]
})

const router = createRouter()

export default router;

